#ifndef __ERRORS_H__
#define __ERRORS_H__

typedef enum _STAT_CODE_ERR_e_
{
    STAT_SUCCESS = 0,
    STAT_ERR_CHMOD,
    STAT_ERR_FTOK,
    STAT_ERR_CALLOC,
    STAT_ERR_INVAILD_PARAM,

    STAT_ERR_FILE_OPEN = 10,
    STAT_ERR_FILE_READ,
    STAT_ERR_FILE_WRITE,
    STAT_ERR_FILE_CLOSE,
    STAT_ERR_FILE_LSEEK,
    STAT_ERR_FILE_FCNTL,
    STAT_ERR_FILE_TCGET,
    STAT_ERR_FILE_TCSET,
    STAT_ERR_FILE_NONEXIST,
    STAT_ERR_FILE_LOCK_BUSY,

    STAT_ERR_SYSTEM_V_FTOK = 30,
    STAT_ERR_SYSTEM_V_MSG_GET,
    STAT_ERR_SYSTEM_V_MSG_SEND,
    STAT_ERR_SYSTEM_V_MSG_RECV,
    STAT_ERR_SYSTEM_V_MSG_CTRL,
    STAT_ERR_SYSTEM_V_MSG_FULL,
    STAT_ERR_SYSTEM_V_SHM_GET,
    STAT_ERR_SYSTEM_V_SHM_AT,
    STAT_ERR_SYSTEM_V_SHM_DT,
    STAT_ERR_SYSTEM_V_SHM_CTRL,
    
    STAT_ERR_SYSTEM_V_SEM_GET = 40,
    STAT_ERR_SYSTEM_V_SEM_CTRL,
    STAT_ERR_SYSTEM_V_SEM_OP,

    STAT_ERR_THREAD_CREATE = 50,
    STAT_ERR_THREAD_DETACH,
    STAT_ERR_THREAD_MUX_INIT,

    STAT_ERR_UART_WRITE = 60,
    STAT_ERR_UART_CFG,
    STAT_ERR_UART_TYPE,
    STAT_ERR_UART_RSP,
    STAT_ERR_UART_ADD,
    STAT_ERR_UART_DISABLE,
    STAT_ERR_UART_NOT_OPEN,

    STAT_ERR_SOCK_SOCKET = 70,
    STAT_ERR_SOCK_BIND,
    STAT_ERR_SOCK_LISTEN,
    STAT_ERR_SOCK_ACCEPT,
    STAT_ERR_SOCK_CONNECT,
    STAT_ERR_SOCK_SEND,
    STAT_ERR_SOCK_RECV,
    STAT_ERR_SOCK_PTON,
    STAT_ERR_SOCK_PAIR,

    STAT_ERR_POSIX_MQ_OPEN = 80,
    STAT_ERR_POSIX_MQ_CLOSE,
    STAT_ERR_POSIX_MQ_UNLINK,
    STAT_ERR_POSIX_MQ_SEND,
    STAT_ERR_POSIX_MQ_RECV,

    STAT_ERR_I2C_UNSUPPORT_ARCH = 90,
    STAT_ERR_I2C_CHAN_FULL,
    STAT_ERR_I2C_BUSY,

    STAT_ERR_QUEUE_FULL = 100,
    STAT_ERR_QUEUE_EMPTY,
    STAT_ERR_QUEUE_PUT_SIZE,
    STAT_ERR_QUEUE_GET_SIZE,

    STAT_ERR_PTHREAD_CREAT = 110,

    SKL_STAT_MAX,
} SKL_STAT_CODE_e;

#endif